/* 首页专属样式 - 优化响应式布局 */
@font-face {
    font-family: 'KuangPaiShouShu';
    src: url('../fonts/AaKuangPaiShouShu-2.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'FZZhuZiAYuanJianB';
    src: url('../fonts/FZZhuZiAYuanJianB.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
        rgba(0, 0, 0, 0.3),
        rgba(0, 0, 0, 0.5)
    );
    z-index: 2;
    pointer-events: none;
}

/* 主容器优化为弹性布局 */
.date-display-container {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    pointer-events: none;
}

/* 时间日期组容器 */
.time-date-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 7vh; /* 与引文的固定间距 */
}

/* 元素间距使用固定值 */
.time-display {
    margin-bottom: 1.5vh !important; /* 时间-农历间距 */
}

.lunar-date {
    margin-bottom: 0.8vh !important; /* 农历-公历间距 */
}

/* 移除所有绝对定位 */
.chinese-quote,
.time-display,
.lunar-date,
.solar-date {
    position: static;
    transform: none !important;
    opacity: 0;
    transition: opacity 0.7s ease;
    left: auto;
    top: auto;
}

.fonts-loaded .chinese-quote,
.fonts-loaded .time-display,
.fonts-loaded .lunar-date,
.fonts-loaded .solar-date {
    opacity: 1;
}

/* 中文引语样式 */
.chinese-quote {
    font-family: 'KuangPaiShouShu', sans-serif;
    font-weight: 400;
    max-width: 90%;
    background-image: url('../images/980.jpg');
    background-size: cover;
    background-position: center;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: contrast(1.2) brightness(1.1);
    text-stroke: 0.5px rgba(255, 255, 255, 0.2);
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.2);
    font-size: 6rem; /* 基础大小 */
    margin-top: -5.5vh;
    white-space: nowrap; /* 确保单行显示 */
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 时间显示样式 */
.time-display {
    font-family: 'FZZhuZiAYuanJianB', sans-serif;
    color: white;
    letter-spacing: 0.125rem;
    z-index: 4;
    text-shadow: 0 0 0.5rem rgba(0, 0, 0, 0.5);
}

/* 农历日期样式 */
.lunar-date {
    font-family: 'FZZhuZiAYuanJianB', sans-serif;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.0625rem;
    z-index: 4;
    text-shadow: 0 0 0.3125rem rgba(0, 0, 0, 0.5);
}

/* 公历日期样式 */
.solar-date {
    font-family: 'FZZhuZiAYuanJianB', sans-serif;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.0625rem;
    z-index: 4;
    text-shadow: 0 0 0.25rem rgba(0, 0, 0, 0.5);
}

#ripple-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* 基础字体大小（中等屏幕） */
.time-display { font-size: 4.5rem; }
.lunar-date { font-size: 1.3rem; }
.solar-date { font-size: 2rem; }

/* 大屏幕调整 */
@media (min-width: 1200px) {
    .time-display { font-size: 5rem; }
    .lunar-date { font-size: 1.5rem; }
    .solar-date { font-size: 2.3rem; }

    .time-date-group {
        margin-bottom: 8vh;
    }
}

/* 平板设备调整 */
@media (max-width: 768px) {
    .overlay {
        background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .time-display { font-size: 3.5rem; }
    .lunar-date { font-size: 1.1rem; }
    .solar-date { font-size: 1.6rem; }

    .time-date-group {
        margin-bottom: 6vh;
    }
}

/* 超小屏幕设备（如折叠屏） */
@media (max-width: 320px) {
    .time-display { font-size: 1.5rem; }
    .lunar-date { font-size: 0.7rem; }
    .solar-date { font-size: 0.9rem; }

    .time-date-group {
        margin-bottom: 3vh;
    }
}

/* 手机设备调整 */
@media (max-width: 480px) {
    .time-display { font-size: 1.8rem; }
    .lunar-date { font-size: 0.8rem; }
    .solar-date { font-size: 1.1rem; }

    .time-date-group {
        margin-bottom: 4vh;
    }
}